﻿using QH.JobBack.Model;
using System.Web;
using System.Web.SessionState;

namespace JobBack.Models
{
    public class AdminUserContext
    {
        //常量，通过key获取session
        private const string sessionKey = "userKey";
        public HttpSessionState httpSession => HttpContext.Current.Session;
        //其他对象调用直接用context.就可以调用，无需new
        public static AdminUserContext context = new AdminUserContext();
        public Admininfo UserInfo_no
        {
            get
            {
                return this.httpSession[sessionKey] as Admininfo;
            }
            set
            {
                this.httpSession[sessionKey] = value;
            }
        }
    }
}